package com.java.program_questions;

import java.util.Scanner;

/**
 * 问题：读取7个数（1—50）的整数值，每读取一个值，程序打印出该值个数的＊
 * 分析：
 */
public class Question46 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入七个整数(1-50)：");

        for (int i = 1; i < 8; i++) {
            int n = sc.nextInt();
            System.out.print("第" + i + "位：");
            if (n < 51 && n > 0) {
                for (int j = 1; j <= n; j++) {
                    System.out.print("*");
                }
                System.out.println("");
            } else {
                System.out.println("输出错误");
            }
        }
    }
}
